package com.fqgj.sentry.policy.dao;

import com.fqgj.common.base.BaseMapper;
import com.fqgj.sentry.policy.entity.PcRuleConditionEntity;

import java.util.List;

/**
 * User: ykpbean
 * Date: 2017-07-29
 * Time: 15:23:32.427
 */

public interface PcRuleConditionDao extends BaseMapper<PcRuleConditionEntity> {
    /**
     * 根据规则id 删除
     *
     * @param ruleId
     * @return
     */
    Integer deleteRuleById(Long ruleId);

    void  deleteByRuleIds(List<Long> ruleIds);

    /**
     * 根据规则id 查询
     *
     * @param ruleId
     * @return
     */
    PcRuleConditionEntity selectByRuleId(Long ruleId);

    /**
     * 根据策略id  查询规则集合
     *
     * @param policyId
     * @return
     */
    List<PcRuleConditionEntity> findRuleConditionByPolicyId(Long policyId);

    List<PcRuleConditionEntity> findAll();

}